const MessageCenter = resolve =>
    require(['common/src/views/public/MessageCenter'], resolve);//消息中心
const MessageDetail = resolve =>
    require(['common/src/views/public/MessageDetail'], resolve);//消息详情-系统消息-目前报错状态
const MyInfomation = resolve =>
    require(['common/src/views/public/MyInfomation'], resolve);//旧版本系统公告
const InformationRelease = resolve =>
    require(['common/src/views/public/InformationRelease'], resolve);//旧版本新建系统公告
const MyAnnouncement = resolve =>
    require(['common/src/views/public/MyAnnouncement'], resolve);//新版本我的公告
const layout = resolve => require(['common/src/views/layout'], resolve);
const SystemInfomation = resolve =>
    require(['common/src/views/public/SystemInfomation'], resolve);// 新版系统公告

const publicModule = {
    path: '/public',
    name: 'public',
    component: layout,
    children: [
        {
            path: '/myInformation',
            name: 'myInformation',
            component: MyInfomation,
            meta: {
                nokeepalive: true
            }
        },
        {
            path: '/informationRelease/:id(\\d*)',
            name: 'informationRelease',
            component: InformationRelease,
            meta: {
                nokeepalive: true
            }
        },
        {
            path: '/messages',
            name: 'messages',
            component: MessageCenter,
            props: { unread: false }
        },
        {
            path: '/unreadMessages',
            name: 'unreadMessages',
            component: MessageCenter,
            props: { unread: true }
        },
        {
            path: '/messageDetail/:id',
            name: 'messageDetail',
            component: MessageDetail
        },
        {
            path: '/systemInfomation',
            name: 'SystemInfomation',
            component: SystemInfomation,
            meta: {
                nokeepalive: true
            }
        },
        {
            path: '/myAnnouncement',
            name: 'myAnnouncement',
            component: MyAnnouncement,
            meta: {
                nokeepalive: true
            }

        }
    ]
};
export default publicModule;
